1. Field of the Invention
The present invention relates to serial-ATA, and more specifically to a queued command-based switching serial-ATA port multiplier and host controller.
2. Description of the Related Art
In the Serial-ATA II: Port Multiplier specification, Revision 1.0 provided by the Serial ATA working group (“Serial-ATA II PM 1.0”), a port multiplier is defined as a mechanism for one active host connection to communicate with multiple devices, as shown in FIG. 1. A port multiplier 101 has one host port, one control port and a number of device ports. Device port addresses start at zero and are numbered sequentially higher until the last device port address has been defined. The host port is coupled to a host 102, and the device ports are coupled to devices 103a to 103n. 
The port multiplier uses four bits, known as the PM Port Field, in all FIS (Frame Information Structure) types to route FISes between the host and the appropriate device. For a host-to-device FIS, the PM Port Field is filled in by the host with the port address of the device to route the FIS to. For a device-to-host FIS, the PM Port Field is filled in by the port multiplier with the port address of the device that is transmitting the FIS.
To transmit a FIS to a device connected to a port multiplier, the host sets the PM Port Field in the FIS to the device's port address. Then the host starts transmitting the FIS to the Port Multiplier according to the Serial ATA: High Speed Serialized AT Attachment, Revision 1.0 (“Serial-ATA 1.0 Specification”). When a port multiplier receives a FIS over the host port, the port multiplier checks the PM Port Field in the FIS to determine the port address that the FIS should be transmitted over.
To transmit a FIS to the host, the device proceeds with the transmission of the FISes to the port multiplier according to the Serial-ATA 1.0 Specification. The port multiplier fills in the PM Port Field with the port address of the transmitting device, and then transmits the modified FIS to the host.
Serial-ATA II PM 1.0 provides information for two switching types: FIS-based switching and command-based switching. If the host controller does not support hardware context switching based on the value of the PM Port Field in a received FIS, then the host utilizes command-based switching and may only have a command or commands outstanding to one device at any point in time.
The host has bandwidth to work with multiple devices simultaneously. However, because command-based switching only allows the host to have a command outstanding to one device at a time, the host cannot use that bandwidth. Therefore, it would be advantageous to provide a method and port multiplier for more efficient switching and data transfer between the host and the devices.